package com.example.springboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.springboot.entity.Cart;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author wgc
 * @since 2023-09-14
 */
public interface CartMapper extends BaseMapper<Cart> {

    Page<Cart> CartPage(Page<Object> objectPage, @Param("userId") Integer userId, @Param("userAdmin") String userAdmin,
                        @Param("name") String name);

    @Update("update cart set num = #{num} where id = #{id}")
    void updateNum(@Param("num") Integer num, @Param("id") Integer id);
}
